package com.tanjun.mallservice.web.service;

import com.mybatisflex.core.service.IService;
import com.tanjun.mallservice.apiservice.enums.cate.CateTypeEnum;
import com.tanjun.mallservice.web.orm.entity.MallCate;
import jakarta.validation.constraints.NotNull;

import java.util.List;

/**
 * @author jjtan
 * @description 针对表【mall_cate(商品分类)】的数据库操作Service
 * @createDate 2024-03-19 15:58:44
 */
public interface MallCateService extends IService<MallCate> {

    public static final Integer MAX_LEVEL=3;

    List<MallCate> listCateByType(CateTypeEnum cateType);

    void addCate(MallCate mallCate);

    /**
     * 根据id查询品类
     *
     * @param cateId 品类id
     * @return
     */
    MallCate getCateById(@NotNull Long cateId);

}
